package com.example.clxy.dao;

import com.example.clxy.entity.Course;
import com.example.clxy.result.business.CourseOneResult;
import com.example.clxy.result.business.CourseResult;
import com.example.clxy.result.business.PageResult.CoursePageResult;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

public interface CourseMapper {
    int deleteByPrimaryKey(String courseid);

    int insert(Course record);

    int insertSelective(Course record);

    Course selectByPrimaryKey(String courseid);

    int updateByPrimaryKeySelective(Course record);

    int updateByPrimaryKey(Course record);

    List<CourseResult> getCourseResults(@Param("experimentid") String experimentid,
                                        @Param("startdate") String startdate,
                                        @Param("semesterid") String semesterid);

    int deleteCourse(String courseid);

    List<CoursePageResult> getCourseList(@Param("coursename") String coursename,
                                         @Param("coursecode") String coursecode,
                                         @Param("coursetype") String coursetype,
                                         @Param("coursesemester") String coursesemester,
                                         @Param("begin")  int begin,
                                         @Param("end") int end,
                                         @Param("pagesize") int pagesize);

    CourseOneResult getCourseById(String courseid);

    String[] getAllCourseName();
}